﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
using DraggingAndSorting.Controllers;
using DraggingAndSorting.Models;

namespace DraggingAndSorting.App_Start
{
	public class Resolver : IDependencyResolver
	{
		private static  readonly IThingRepository _singletonRepositroy = new ThingRepository();

		public object GetService(Type serviceType)
		{
			return serviceType == typeof (HomeController) ? new HomeController(_singletonRepositroy) : null;
		}

		public IEnumerable<object> GetServices(Type serviceType)
		{
			return Enumerable.Empty<object>();
		}
	}
}